package com.misic.wed;

import com.misic.pojo.Singer;
import com.misic.service.SingerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/singer")
public class SingerController {
    @Autowired
    private SingerService singerService;
    /**
     * 查询所有歌手
     */
    @GetMapping(value = "/allSinger")
    public List<Singer> allSinger(){
        return singerService.allSinger();
    }
}
